﻿@model OAuth.Server.ViewModels.Consent.VScope

<li class="list-group-item">
    @if (Model.Name == "openid")
    {
        <input class="consent-scopecheck"
               type="hidden"
               name="ScopesConsented"
               value="@Model.Name"
               checked />
    }
    else
    {
        <label>
            <input class="consent-scopecheck"
                   type="checkbox"
                   name="ScopesConsented"
                   id="scopes_@Model.Name"
                   value="@Model.Name"
                   checked="@Model.Checked"
                   disabled="@Model.Required" />
            @if (Model.Required)
            {
                <input type="hidden"
                       name="ScopesConsented"
                       value="@Model.Name" />
            }
            <strong>@Model.DisplayName</strong>
            @if (Model.Emphasize)
            {
                <span class="glyphicon glyphicon-exclamation-sign"></span>
            }
        </label>
        if (!string.IsNullOrWhiteSpace(Model.Description))
        {
            <div class="consent-description">
                <label for="scopes_@Model.Name">@Model.Description</label>
            </div>
        }
    }
</li>